package com.lengxf.pay.icbc.bean.refund;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.lengxf.pay.common.bean.RefundOrder;
import lombok.Data;

@Data
public class RefundOrderReq {


    //商户、部门编号(特约商户12位，特约部门15位)
    @JsonProperty("mer_id")
    private String merId;

    //退款编号,商户系统生成的退款编号，商户交易系统中需唯一
    @JsonProperty("reject_no")
    private String rejectNo;

    //退款金额,单位：分
    @JsonProperty("reject_amt")
    private String rejectAmt;

    //商户订单号
    @JsonProperty("out_trade_no")
    private String outTradeNo;

    public RefundOrderReq(RefundOrder refundOrder, String merId) {
        this.merId = merId;
        this.rejectNo = refundOrder.getRefundOrderNo();
        this.rejectAmt = String.valueOf(refundOrder.getAmount());
        this.outTradeNo = refundOrder.getOrderNo();
    }

}
